package com.edushare.common.vo;

import com.edushare.common.vo.auto._Batches;

public class Batches extends _Batches implements EduShareEntity{
	private static final long serialVersionUID = -139103103198560631L;
	public static final int BATCH_ACTIVE = 10;
	public static final int BATCH_GRADUATED = 20;
	
	public Batches(){
		setCurrentSemester(0);
	}
	
	public boolean isGraduated(){
		return this.getBatchStatus() == BATCH_GRADUATED;
	}
	
	@Override
	public String getBatchName(){
		if(getCurricula() != null){
			return getCurricula().getCurriculaName() + " "+ 
				getStartingSemester().getSemesterName() + " "+ getBatchYear().toString();
		}else
			return "New Batch";
	}

	public int getObjectPrimaryKey() {
		return getBatchId();
	}

	public String getTitle() {
		return getBatchName();
	}
}
